rm java rpc test_android cnn_function.o  test_android.o  rpc_extract.o  util.o

exe_dir=..
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/mkl/lib/intel64:/opt/intel/lib/intel64:$exe_dir/cnn/obj/
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$exe_dir/cnn/obj/:/opt/ego/opencv/lib/
#export PKG_CONFIG_PATH=/opt/ego/opencv/lib/pkgconfig/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$exe_dir/cnn/obj/

g++ -DUSE_LINUX -I./ -Wall -Wno-unknown-pragmas -Wfatal-errors -Wunused-but-set-variable -Wno-unused-result -Ofast -std=c++11  -c util.cpp -o util.o
g++  -I/opt/ego/opencv/include/ -I./ -Wall -Wno-unknown-pragmas -Wfatal-errors -Wunused-but-set-variable -Wno-unused-result -Ofast -std=c++11  -c cnn_function.cpp -o cnn_function.o
g++ -DUSE_LINUX -I/opt/ego/opencv/include/ -I./ -Wall -Wno-unknown-pragmas -Wfatal-errors -Wunused-but-set-variable -Wno-unused-result -Ofast -std=c++11 -I/usr/include/mysql/ -I$exe_dir/rpclib/include/ -lmysqlclient -L$exe_dir/rpclib/build -lrpc -lpthread  -c rpc_extract_face.cpp -o rpc_extract.o

g++  -I/usr/include/mysql/ -I$exe_dir/rpclib/include/ -L$exe_dir/rpclib/build -lrpc -lpthread -I./ -Wall -Wno-unknown-pragmas -Wfatal-errors -Wunused-but-set-variable -Wno-unused-result -Ofast -std=c++11 util.o cnn_function.o rpc_extract.o -o java `pkg-config --cflags --libs opencv`          -L$exe_dir/cnn/obj/ -lcnn -lrpc -lpthread -lharfbuzz -lmysqlclient

#./rpc_extract
